/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainWindow.java
 *
 * Created on Dec 18, 2011, 12:08:26 PM
 */
package jaotwinker;

/**
 *
 * @author Grayson
 */
public class MainWindow extends javax.swing.JFrame {

    public Database db;
    public ExcludedItems ei;
    public java.util.ArrayList slots;

    public boolean compressImplants = true;
    public boolean excludeMode = false;
    public String xmlFile = "C:/Funcom/AO Tools/AOXRDB/output/XRDB4_Plugins-XMLOutput_18-04-13-00_FULL-CLEAN.xml";
    public String cleanXmlFile = "clean.xml";
    public String EIFile = "ExcludedItems";
    
    public boolean progressReady = false;
    
    /** Creates new form MainWindow */
    public MainWindow() {
        initComponents();
        DisplayMessage("Loading items...");
        jButton1.setEnabled(false);
        slots = new java.util.ArrayList();
        
        Slot slot = new Slot(10,7,"HUD1","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(71,7,"HUD2","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(132,7,"HUD3","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,65,"UTIL1","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(71,65,"UTIL2","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(132,65,"UTIL3","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,123,"RightHand","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(71,123,"BELT","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(132,123,"LeftHand","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,180,"DECK1","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(71,180,"DECK2","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(132,180,"DECK3","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,238,"DECK4","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(71,238,"DECK5","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        slot = new Slot(132,238,"DECK6","Weapon",this); 
        WeaponTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,7,"Neck","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(71,7,"Head","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(132,7,"Back","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,65,"RightShoulder","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(71,65,"Chest","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(132,65,"LeftShoulder","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,123,"RightArm","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(71,123,"Hands","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(132,123,"LeftArm","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,180,"RightWrist","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(71,180,"Legs","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(132,180,"LeftWrist","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,238,"RightFinger","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(71,238,"Feet","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        slot = new Slot(132,238,"LeftFinger","Armor",this); 
        ClothTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,7,"Eyes","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        slot = new Slot(71,7,"Head","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        slot = new Slot(132,7,"Ears","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,65,"RightArm","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        slot = new Slot(71,65,"Chest","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        slot = new Slot(132,65,"LeftArm","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,123,"RightWrist","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        slot = new Slot(71,123,"Waist","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        slot = new Slot(132,123,"LeftWrist","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        
        slot = new Slot(10,180,"RightHand","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        slot = new Slot(71,180,"Legs","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        slot = new Slot(132,180,"LeftHand","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
        
        slot = new Slot(71,238,"Feet","Implant",this); 
        ImplantTab.add(slot); slots.add(slot);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jComboBox1 = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jComboBox2 = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        jComboBox3 = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jLabel4 = new javax.swing.JLabel();
        WeaponTab = new javax.swing.JLabel();
        ClothTab = new javax.swing.JLabel();
        ImplantTab = new javax.swing.JLabel();
        jTextField2 = new javax.swing.JTextField();
        jTextField1 = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        jProgressBar1 = new javax.swing.JProgressBar();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();
        jCheckBoxMenuItem2 = new javax.swing.JCheckBoxMenuItem();
        jMenuItem1 = new javax.swing.JMenuItem();

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("JAOTwinker");
        addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                loadContent(evt);
            }
        });

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Atrox", "Opifex", "Nanomage", "Solitus" }));

        jLabel1.setLabelFor(jComboBox1);
        jLabel1.setText("Breed");

        jLabel2.setLabelFor(jComboBox2);
        jLabel2.setText("Profession");

        jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Adventurer", "Agent", "Bureaucrat", "Doctor", "Enforcer", "Engineer", "Fixer", "Keeper", "Martial Artist", "Meta-Physicist", "Nano Technician", "Shade", "Soldier", "Trader" }));

        jLabel3.setLabelFor(jComboBox3);
        jLabel3.setText("Faction");

        jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Clan", "Neutral", "Omni-Tek" }));

        jButton1.setText("Search");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jCheckBox1.setSelected(true);
        jCheckBox1.setText("Shadowlands");
        jCheckBox1.setToolTipText("");
        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });

        jCheckBox2.setSelected(true);
        jCheckBox2.setText("AI/LE/LoX");
        jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox2ActionPerformed(evt);
            }
        });

        jLabel4.setLabelFor(jTextField1);
        jLabel4.setText("Level");

        WeaponTab.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jaotwinker/resources/weapons.png"))); // NOI18N
        WeaponTab.setAlignmentY(0.0F);
        WeaponTab.setFocusable(false);

        ClothTab.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jaotwinker/resources/clothing.png"))); // NOI18N
        ClothTab.setFocusable(false);

        ImplantTab.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jaotwinker/resources/implants.png"))); // NOI18N
        ImplantTab.setFocusable(false);

        jTextField2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField2ActionPerformed(evt);
            }
        });

        jTextField1.setText("220");
        jTextField1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField1ActionPerformed(evt);
            }
        });

        jList1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jList1.setToolTipText("");
        jScrollPane2.setViewportView(jList1);

        jMenu1.setText("File");

        jMenuItem2.setText("Upgrade Database");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                UpgradeDatabase(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jCheckBoxMenuItem1.setSelected(true);
        jCheckBoxMenuItem1.setText("Shorten Implant List");
        jCheckBoxMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                shortenImplantListAction(evt);
            }
        });
        jMenu1.add(jCheckBoxMenuItem1);

        jCheckBoxMenuItem2.setText("Exclude Mode");
        jCheckBoxMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                excludeModeAction(evt);
            }
        });
        jMenu1.add(jCheckBoxMenuItem2);

        jMenuItem1.setText("Refresh Items");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                refreshItems(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(WeaponTab, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ClothTab, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ImplantTab, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 570, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(102, 102, 102))
                    .addComponent(jScrollPane2, 0, 0, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jCheckBox2)
                                    .addComponent(jCheckBox1)))
                            .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jComboBox3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(jCheckBox1)
                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton1)
                            .addComponent(jCheckBox2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE))
                    .addComponent(ClothTab, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(WeaponTab, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ImplantTab, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)
                    .addComponent(jTextField2))
                .addGap(14, 14, 14))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    // TODO add your handling code here:
    db.search();
    //System.out.println("done");
}//GEN-LAST:event_jButton1ActionPerformed

private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
    if(!jCheckBox1.isSelected()) { jCheckBox2.setSelected(false); jCheckBox2.setEnabled(false); }
    if(jCheckBox1.isSelected()) { jCheckBox2.setEnabled(true); }
}//GEN-LAST:event_jCheckBox1ActionPerformed

private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jCheckBox2ActionPerformed

private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField2ActionPerformed

private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jTextField1ActionPerformed

private void loadContent(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_loadContent
    ei = new ExcludedItems(EIFile); // make file dialog for this later
    // If cleaned file doesn't exist, create it
    Cleaner jc = new Cleaner();
    if(!(new java.io.File(cleanXmlFile)).exists()) UpgradeDatabase(null);   
    db = new Database(this);
    //progress = new Progress(this, false, this);
    //progress.setVisible(true);
    db.LoadItems(cleanXmlFile);
    //progress.setVisible(false);
    jList1.setModel(db.LoadSkills());
    jList1.setSelectedIndex(0);
    jButton1.setEnabled(true);
}//GEN-LAST:event_loadContent

private void shortenImplantListAction(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shortenImplantListAction
    if(jCheckBoxMenuItem1.isSelected()) compressImplants=true;
    else compressImplants=false;
}//GEN-LAST:event_shortenImplantListAction

private void excludeModeAction(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_excludeModeAction
    if(jCheckBoxMenuItem2.isSelected()) excludeMode=true;
    else {
        excludeMode=false;
        ei.save(EIFile);
        DisplayMessage("Saved new EI file.");
    }
}//GEN-LAST:event_excludeModeAction

private void refreshItems(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshItems
    jButton1.setEnabled(false);
    //progress.setVisible(true);
    DisplayMessage("Upgrading...");
    Cleaner jc = new Cleaner();
    jc.createCleanXML(xmlFile, ei, this);
    db = new Database(this);
    db.LoadItems(cleanXmlFile);
    jList1.setModel(db.LoadSkills());
    jList1.setSelectedIndex(0);
    //progress.setVisible(false);
    jButton1.setEnabled(true);
}//GEN-LAST:event_refreshItems

private void UpgradeDatabase(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UpgradeDatabase
    javax.swing.JFileChooser fc = new javax.swing.JFileChooser();
    fc.setFileFilter(new FileChooserXmlFilter());
    // TODO: make sure to get rid of this before sharing with anyone
    java.io.File dir = new java.io.File("C:/Funcom/AO Tools/AOXRDB/output/");
    fc.setSelectedFile(dir);
    int returnVal = fc.showOpenDialog(this);
    if(returnVal==javax.swing.JFileChooser.APPROVE_OPTION) {
        java.io.File f = fc.getSelectedFile();
        xmlFile = f.getAbsolutePath();
        refreshItems(evt);
    }
}//GEN-LAST:event_UpgradeDatabase

public void DisplayMessage(String msg) {
    jTextField2.setText(msg);
}

public void resetProgress() {
    jProgressBar1.setValue(0);
    jProgressBar1.setStringPainted(false);
}

public void initProgress(int max) {
    jProgressBar1.setValue(0);
}

public void updateProgress(int pos) {
    jProgressBar1.setValue(pos);
}
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                
                new MainWindow().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel ClothTab;
    private javax.swing.JLabel ImplantTab;
    private javax.swing.JLabel WeaponTab;
    public javax.swing.JButton jButton1;
    public javax.swing.JCheckBox jCheckBox1;
    public javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem1;
    private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem2;
    public javax.swing.JComboBox jComboBox1;
    public javax.swing.JComboBox jComboBox2;
    public javax.swing.JComboBox jComboBox3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    public javax.swing.JList jList1;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    public javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTextArea jTextArea1;
    public javax.swing.JTextField jTextField1;
    public javax.swing.JTextField jTextField2;
    // End of variables declaration//GEN-END:variables
    
}
